package com.yanqu.road.server.cmd.activity.peakseacraft;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.PeakSeacraftProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.manager.activity.peakseacraft.PeakSeacraftMgr;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;

/**
 * @Description
 */
@Cmd(code = CrossProtocol.C_PEAK_SEACRAFT_GET_MEMBER_ALL_ROUND_SCORE, desc = "海上争霸 所有回合结果")
public class CrossPeakSeacraftGetMemberRoundScoreCmd extends CrossUnionCommand {


    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        PeakSeacraftProto.PeakSeacraftGetMemberRoundScoreReqMsg reqMsg = PeakSeacraftProto.PeakSeacraftGetMemberRoundScoreReqMsg.parseFrom(packet.getBytes());
        YanQuMessage pbMsg = YanQuMessageUtils.buildMessage(ClientProtocol.U_PEAK_SEACRAFT_GET_MEMBER_ALL_ROUND_SCORE,
                PeakSeacraftMgr.getMemberRoundScore(reqMsg.getActivityId(), reqMsg.getMemberId()));
        MessageHelper.sendPacket(serverId, packet.getPlayerId(), pbMsg);
    }

    @Override
    public void sendData() {

    }
}
